package br.com.sgo.util;

import java.io.IOException;
import java.util.Properties;
import br.com.caelum.vraptor.ioc.ApplicationScoped;
import br.com.caelum.vraptor.ioc.Component;

@Component
@ApplicationScoped
public class ApplicationProperties {

	private final Properties properties = new Properties();

	public ApplicationProperties(Properties properties) {
		try {
			this.properties.load(this.getClass().getClassLoader().getResourceAsStream("application.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public String getRootPath() {
		return this.properties.getProperty("application.rootPath");
	}
	
	public String getName() {
		return this.properties.getProperty("application.name");
	}
	
	public String getWelcome() {
		return this.properties.getProperty("application.welcome");
	}	
	
	public String getVersion() {
		return this.properties.getProperty("application.version");
	}	

}